# 配置文件
from typing import Dict, List, Tuple
import numpy as np
import torch

class ExpConfig(object):
    def __init__(self):
        self.name = 'apps.exp.exp_config.ExpConfig'

    # 定义配置变量
    # 雷达参数
    c = 3e8          # 光速 [m/s]
    f0 = 10e9        # 载频 [Hz]
    B = 5e6          # 带宽 [Hz]
    S = 50e6         # 采样率 [Hz]
    N = 1024         # 采样点数

    # 目标参数
    targets = [
        {"r": 1000, "v": 30, "alpha": 1.0},   # 目标1：距离1000m，速度30m/s
        {"r": 2500, "v": -50, "alpha": 0.5}   # 目标2：距离2500m，速度-50m/s
    ]

    # ==============================
    # 发射信号生成 (LFM)
    # ==============================
    Ts = 1/S  # 采样间隔
    t = torch.arange(N) * Ts  # 时间序列

    # 线性调频信号相位计算
    K = B / (N*Ts)  # 调频斜率
    phase = 2 * torch.pi * (f0 * t + 0.5 * K * t**2)
    s = torch.exp(1j * phase)  # 复数信号